Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reversed deprecations for Image constants, except for duplicate Resampling attributes #6830

Merged
merged 4 commits into from
Dec 31, 2022

Conversation

radarhere
Copy link
Member

Resolves #6537

The user in the issue found a warning that Image.BILINEAR is deprecated, and questions whether it is necessary to deprecate this.

This PR removes the deprecation warnings for Image.* constants added in #5954 (and released in Pillow 9.1.0).
However, there are three exceptions - I've left LINEAR, CUBIC (which have been duplicates of other constants since PIL) and ANTIALIAS (which has been a duplicate since #1028) deprecated.

I'm also leaving the deprecations for ImageCms, ImageFont, BlpImagePlugin, FtexImagePlugin and PngImagePlugin in place.

See what you think of this.

@hugovk
Copy link
Member

hugovk commented Dec 28, 2022

Thanks for picking this up. Looks fine, let's keep this open a few days and merge before January if there's no strong objections.

Let's also mention it in the release notes, and add a note (with .. note:: ?) to https://pillow--6830.org.readthedocs.build/en/6830/deprecations.html#constants to mention that some had been deprecated but are no longer.

Also, I wonder if we should somehow mention it at https://pillow--6830.org.readthedocs.build/en/6830/releasenotes/9.1.0.html#constants? These are historical, but perhaps some sort of note, even if just a link to the 9.3.0 notes, could help?

@radarhere
Copy link
Member Author

Ok, I've added a commit to update the documentation.

Comment on lines 112 to 113
In Pillow 9.1.0, the following constants were deprecated. Those deprecations have now
been restored.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wonder if something like this is clearer?

Suggested change
In Pillow 9.1.0, the following constants were deprecated. Those deprecations have now
been restored.
In Pillow 9.1.0, the following constants were deprecated.
That has been reversed and these constants will now remain available.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, sure. I've pushed a commit changing that, and the text in deprecations.rst.

@hugovk hugovk added the automerge Automatically merge PRs that are ready label Dec 30, 2022
@mergify mergify bot merged commit fc9a8a3 into python-pillow:main Dec 31, 2022
@radarhere radarhere deleted the enum branch December 31, 2022 00:04
@radarhere radarhere changed the title Removed deprecations for Image constants, except for duplicate Resampling attributes Reversed deprecations for Image constants, except for duplicate Resampling attributes Dec 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge Automatically merge PRs that are ready
Projects
None yet
Development

Successfully merging this pull request may close these issues.

API changes for Resampling modes
2 participants